<?php

namespace Api\Controller;

use Think\Controller;

class RootController extends Controller {

    protected function _initialize() 
    {
        $auth_check = false;
        if ($auth_check) {
            $post = $_POST;
            $post_token = $post['token'];
            unset($post['token']);
            ksort($post);
            $get_str = http_build_query($post); 
            $token = md5($get_str);
            if ($token != $post_token) {
                $res = [
                    'status' => 9999,
                    'msg' => 'auth check false',
                    'data' => [
                    ]
                ];
                echo json_encode($res);
                exit;
            }
        }
    }
}

?>
